package Windows.Tree;

import javax.swing.Icon;
import javax.swing.ImageIcon;
import javax.swing.tree.DefaultMutableTreeNode;

import Tools.IMG;

public class TreeNodePic extends DefaultMutableTreeNode {
	private ImageIcon ii;

	public TreeNodePic() {
		ii = IMG.root;
	}

	public TreeNodePic(String title, ImageIcon img) {
		super(title);
		this.ii = img;
	}

	public TreeNodePic(String title, String img) {
		super(title);
		this.ii = new ImageIcon(img);
	}

	public Icon getIcon() {
		return ii;
	}

	public void setImageIcon(ImageIcon ii) {
		if (this.ii != ii)
			this.ii = ii;
	}

	@Override
	public String toString() {
		return super.toString();
	}
}
